Documentation > CMS Template API Library > Input > NextPanel(List[AssetPanelEntry],ListPanelType,Nullable[Int32],Nullable[Int32],SortOrder,String,Boolean)

NextPanel

Gets the next available panel from the supplied list. Use in the input to loop over a List of AssetPanelEntries which are returned by asset.GetPanelsFromFolder() or panel.GetPanelsFromFolder().

public System.Boolean NextPanel(List[AssetPanelEntry],ListPanelType,Nullable[Int32],Nullable[Int32],SortOrder,String,Boolean)


Returns

Whether there is an available panel.

Parameters

NameDescriptionType
list The list of AssetPanelEntries to use. List<AssetPanelEntry>
type Optional: Type of list to display. Default is ListPanelType.Regular CrownPeak.CMSAPI.ListPanelType
min Optional: Minimum number of panels (but always at least one). Default is null Nullable<Int32>
max Optional: Maximum number of panels. Default is null Nullable<Int32>
sort Optional: Sort order used for the sorted list type. Must be specified if and only if the type is ListPanelType.Sorted CrownPeak.CMSAPI.SortOrder
displayName Optional: Name to display for the list panel. Not applicable in Classic. Default is null System.String
isAutoIndexed Optional: Whether the panel handles the list index field automatically. In most cases this should be true, unless another field in the list has the same name as the list. Default is true System.Boolean

Code Example

C#

Sample:
List<AssetPanelEntry> panels = asset.Parent.GetPanelsFromFolder( "folder_list", "folder_label","folder_id");

while(Input.NextPanel(panels))
{
  Input.ShowTextBox("Name", "folder_label"); 
  Input.ShowTextBox("Property From Current Panel", "property_name"); 
}

Connect with Crownpeak